package com.zc.study.thread.多线程第三章节.thread3_1_2;

public class Thread2 extends Thread {
    private Object object;

    public Thread2(Object object) {
        this.object = object;
    }

    @Override
    public void run() {
        super.run();

        System.out.println("线程2 start");
        synchronized (object){
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("开始唤醒线程1");
            object.notify();
            System.out.println("唤醒结束");
        }
        System.out.println("线程2 end");
    }
}
